from fastapi import APIRouter, Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.db.session import get_db
from app.admin.schemas.user import User
from app.schemas.token import APIResponse
from app.security.auth import get_current_active_superuser

router = APIRouter()


@router.get("/admin-panel", response_model=APIResponse[dict])
async def admin_panel(
    current_user: User = Depends(get_current_active_superuser)
):
    """
    管理员面板（仅限超级用户）
    """
    return APIResponse(
        code=200,
        msg="获取管理员面板信息成功",
        data={"message": "Welcome to admin panel", "user": current_user.username}
    )